<?php

namespace App\Api\Logic\Validate;

class UserAddressValidate extends BaseValidate
{
    protected $rule = [
        'province_id'=>'required',
        'city_id'=>'required',
        'area_id'=>'required',
        'address'=>'required',
        'is_default'=>'required',
        'id'=>'required',
        'name'=>'required',
        'mobile'=>'required',
        'province_val'=>'required',
        'city_val'=>'required',
        'area_val'=>'required'
    ];

    protected $message = [
        'province_id.required'=>'请选择省份',
        'city_id.required'=>'请选择城市',
        'area_id.required'=>'请选择区域',
        'address.required'=>'请输入详细地址',
        'is_default.required'=>'请选择是否是默认地址',
        'id.required'=>'请选择操作的数据',
        'name.required'=>'请输入收货人名称',
        'mobile.required'=>'请输入收货人手机号',
        'province_val.required'=>'请输入省份名称',
        'city_val.required'=>'请输入城市名称',
        'area_val.required'=>'请输入区域名称'
    ];

    protected $scene = [
        'addAddress'=>'name,mobile,province_id,city_id,area_id,province_val,city_val,area_val,address,is_default',
        'delAddress'=>'id',
        'getAddressInfo'=>'id',
        'updateAddress'=>'id,name,mobile,province_id,city_id,area_id,province_val,city_val,area_val,address,is_default'
    ];


}
